home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!wyse!vsi1!apple!rutgers!aramis.rutgers.edu!dartagnan.rutgers.edu!mcgrew
- From: mcgrew@dartagnan.rutgers.edu (Charles Mcgrew)
- Newsgroups: comp.sources.sun
- Subject: v01i055: Rntool - another tooltool newsreader
- Message-ID: <Jul.20.17.17.43.1989.17210@dartagnan.rutgers.edu>
- Date: 20 Jul 89 21:17:45 GMT
- Organization: Rutgers Univ., New Brunswick, N.J.
- Lines: 515
- Approved: mcgrew@aramis.rutgers.edu
-
- Submitted-by: bowen%prg.oxford.ac.uk@nfsnet-relay.ac.uk
- Posting-number: Volume 1, Issue 55
- Archive-name: rntool
-
-
- Copyright (C) 1989 University of Oxford
- Permission to copy without fee all or part of this material is granted
- provided that the copies are not made or distributed for direct
- commercial advantage, the University of Oxford copyright notice and the
- title and its date appear, and notice is given that copying is by
- permission of the University of Oxford or the original contributor.
-
- #! /bin/sh
- # This is a shell archive, meaning:
- # 1. Remove everything above the #! /bin/sh line.
- # 2. Save the resulting text in a file.
- # 3. Execute the file with /bin/sh (not csh) to create the files:
- # README
- # Makefile
- # rntool
- # rntool.1
- # rn.sh
- # rn.tt
- # news.icon
- # nonews.icon
- # This archive created: Mon Apr 17 16:21:23 1989
- # By: Jonathan "news" Bowen (Programming Research Group, Oxford University, UK)
- export PATH; PATH=/bin:$PATH
- echo shar: extracting "'README'" '(1734 characters)'
- if test -f 'README'
- then
- echo shar: will not over-write existing file "'README'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'README'
- XThese files relate to the ``rntool'' command which allows news to be
- Xread within a SunView window using ``tooltool'' and ``rn''. The
- Xsoftware has only been tested on a Sun 3/50. The files include:
- X
- X Makefile - makefile to install files *
- X README - this file *
- X news.icon - icon displayed when new news is present
- X nonews.icon - icon display when there is no new news
- X rn.sh - main news reading "csh" shell script *
- X rn.tt - tooltool application description file *
- X rntool - start-up shell script *
- X rntool.1 - manual page for tool *
- X
- X"rntool" is normally invoked by a user (e.g. in $HOME/.suntools or
- X$HOME/.rootmenu) and this in turn invokes "tooltool".
- X
- X* Note that some files are currently put under "/usr/news". This may
- Xwell need to be changed depending on the local configuration. All the
- Xfiles except the icon files should be scanned for this string and
- Xedited appropriately before the files are installed (by running
- X"make").
- X
- X"rn.sh" makes use of the "sunbell" program to sound the bell when news
- Xarrived. If this is not available then "rn.sh" should be edited at this
- Xpoint to edit out the call to "sunbell" and to sound the bell in some
- Xother way if desired. An example is given as a comment in the shell
- Xscript.
- X
- X
- XWritten by
- X Jonathan Bowen
- X Oxford University Computing Laboratory,
- X Programming Research Group,
- X 8-11 Keble Road,
- X Oxford OX1 3QD,
- X England.
- X Tel: +44-865-272574 (Sec: +44-865-273840)
- X
- XCopyright (C) 1988,1989 by J.P.Bowen
- X
- XPermission is granted to copy these files for
- Xnon-profit purposes, provided this notice is left intact.
- X
- XPlease send corrections, improvements, etc. to:
- X JANET: bowen@uk.ac.oxford.prg
- X ARPA: bowen%prg.oxford.ac.uk@nsfnet-relay.ac.uk
- X UUCP: ...!uunet!mcvax!ukc!ox-prg!bowen
- X
- SHAR_EOF
- if test 1734 -ne "`wc -c < 'README'`"
- then
- echo shar: error transmitting "'README'" '(should have been 1734 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'Makefile'" '(358 characters)'
- if test -f 'Makefile'
- then
- echo shar: will not over-write existing file "'Makefile'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'Makefile'
- XROOT=/usr/news
- XBIN=/usr/local/bin
- XMAN=/usr/man/man1
- XIMAGES=$(ROOT)/images
- XTOOLTOOL=$(ROOT)/tooltool
- X
- Xinstall:
- X chmod +x rntool rn.sh
- X cp rntool $(BIN)
- X cp rntool.1 $(MAN)
- X cp news.icon nonews.icon $(IMAGES)
- X cp rn.tt rn.sh $(TOOLTOOL)
- X
- Xshar:
- X shar -a README Makefile rntool rntool.1 rn.sh rn.tt \
- X news.icon nonews.icon > rntool.shar
- X compress rntool.shar
- X
- SHAR_EOF
- if test 358 -ne "`wc -c < 'Makefile'`"
- then
- echo shar: error transmitting "'Makefile'" '(should have been 358 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'rntool'" '(401 characters)'
- if test -f 'rntool'
- then
- echo shar: will not over-write existing file "'rntool'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'rntool'
- X#!/bin/sh
- X#
- X# rntool - window-based news reader for "rn"
- X#
- X# Written by Jonathan Bowen, October 1987
- X# Updated July 1988, February 1989
- X#
- X
- XROOT=/usr/news export ROOT
- XPATH=/bin:/usr/ucb:/usr/bin:/usr/local/bin:$ROOT/bin:$PATH
- X export PATH
- XPROGNAME=`basename $0` export PROGNAME
- XNEWSPROG=`basename $PROGNAME tool` export NEWSPROG
- X
- Xexec $ROOT/bin/tooltool -f $ROOT/tooltool/$NEWSPROG.tt -Wi $*
- X
- SHAR_EOF
- if test 401 -ne "`wc -c < 'rntool'`"
- then
- echo shar: error transmitting "'rntool'" '(should have been 401 characters)'
- fi
- chmod +x 'rntool'
- fi # end of overwriting check
- echo shar: extracting "'rntool.1'" '(2012 characters)'
- if test -f 'rntool.1'
- then
- echo shar: will not over-write existing file "'rntool.1'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'rntool.1'
- X.TH RNTOOL 1L "6 February 1989" "" "LOCAL"
- X.UC
- X.ds RT /usr/news
- X.SH NAME
- Xrntool \- window-based interface for news
- X.SH SYNOPSIS
- X.B rntool
- X[
- X.B \-i
- X.I seconds
- X]
- X.SH DESCRIPTION
- X.I Rntool
- Xis a window-based interface to the \fIrn\fP(1) program for reading news
- Xin the SunView environment on a Sun workstation. The window is
- Xopened as a icon initially. The icon indicates whether there is any
- Xnews to be read. Additionally, the bell is sounded when new news
- Xarrives, and \fIrn\fP is automatically invoked. The news may then be
- Xread by opening the window and using \fIrn\fP in the normal way. If
- Xthere is no new news available, \fIrn\fP may still be invoked by
- Xopening the window. The window is automatically closed on exit from
- X\fIrn\fP.
- X.PP
- XSome commands may be entered using a mouse-selectable menu at the top
- Xof the window if desired. Pressing the left mouse button invokes the
- Xdefault action; pressing the right mouse button may display a sub-menu
- Xfor further selection of actions.
- X.PP
- XThe \fB$NEWSPROG\fP environment variable may be used to specify
- Xanother news reading program if desired. However the menu provided has
- Xbeen specifically tailored for the default program, \fIrn\fP.
- X.SH OPTIONS
- XThe follow options are available:
- X.TP 12
- X.BI \-i " seconds"
- XCheck for new news every \fIseconds\fP seconds.
- XThe default is 600 (10 minutes).
- X.TP 12
- X.BI \-W .\|.\|.
- XThe standard \fIsuntools\fP generic tool arguments may also be included
- Xif desired. See \fIsuntools\fP(1) for more information.
- X.SH FILES
- X.PD 0
- X.TP 35
- X\*(RT/images/news.icon
- Xnews available icon
- X.TP 35
- X\*(RT/images/nonews.icon
- Xno news available icon
- X.TP 35
- X\*(RT/tooltool/rn.tt
- X\fItooltool\fP(1) description file
- X.TP 35
- X\*(RT/tooltool/rn.sh
- Xapplication shell script
- X.PD
- X.SH "SEE ALSO"
- Xmailtool(1),
- Xnews(5),
- Xnewstool(1L),
- Xshelltool(1),
- Xrn(1),
- Xsunbell(1L),
- Xtooltool(1)
- X.SH AUTHOR
- XJonathan Bowen, Oxford University
- X.SH BUGS
- XThis shell script and manual page may change without notice.
- X.br
- XPlease report problems to \fI<bowen@prg.oxford.ac.uk>\fP.
- SHAR_EOF
- if test 2012 -ne "`wc -c < 'rntool.1'`"
- then
- echo shar: error transmitting "'rntool.1'" '(should have been 2012 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'rn.sh'" '(2099 characters)'
- if test -f 'rn.sh'
- then
- echo shar: will not over-write existing file "'rn.sh'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'rn.sh'
- X#!/bin/csh -f
- X#
- X# rn.sh - News reading program - check for news every so often,
- X# change icon etc. when news is present/absent.
- X#
- X# Normally invoked by "tooltool -f rn.tt".
- X#
- X# Written by Jonathan Bowen, July/August 1988
- X# Based on "newsreader", written by Jonathan Bowen, October 1987
- X# Based on a "newsread" shell script by Jeremy Jacob, 9 Oct 87
- X# Updated by Jonathan Bowen, February 1989
- X#
- X
- Xonintr -
- X
- Xif (! ${?ROOT}) then
- X set ROOT=/usr/news
- Xendif
- X
- Xset PATH=/bin:/usr/bin:/ucb/bin:/usr/local/bin:$ROOT/bin
- X
- Xif (! ${?PROGNAME}) then
- X set PROGNAME=`basename $0`
- Xendif
- X
- X# Directory containing icons for this shell script
- Xset ICONDIR=$ROOT/images
- X
- X# Interval in seconds between checks for news
- Xset INTERVAL=600
- X
- X# BEL is the ASCII bell character (octal 007)
- Xset BEL=`echo -n x | tr x '\007'`
- X# ESC is the ASCII escape character (octal 033)
- Xset ESC=`echo -n x | tr x '\033'`
- X
- X# "rn" is the default newsreading program unless NEWSPROG is set
- Xif (! ${?NEWSPROG}) then
- X set NEWSPROG=rn
- Xendif
- X
- Xecho -n "${ESC}]L${ESC}\"
- X
- Xwhile (1)
- X
- X echo -n "${ESC}[2t"
- X set NEWNEWS=`rn -c`
- X
- X if (! $#NEWNEWS) then
- X echo -n "${ESC}]I$ICONDIR/nonews.icon${ESC}\"
- X echo -n "${ESC}]l$PROGNAME - No news${ESC}\"
- X
- X# Check for new news
- X while (! $#NEWNEWS)
- X onintr read
- X sleep $INTERVAL
- X set NEWNEWS=`rn -c`
- X goto cont
- X# Read news anyway
- Xread:
- X onintr -
- X echo -n "${ESC}]l$PROGNAME - Reading news${ESC}\${ESC}[1t"
- X clear
- X $NEWSPROG
- X clear
- X echo -n "${ESC}[2t${ESC}]l$PROGNAME - No news${ESC}\"
- Xcont:
- X onintr -
- X end
- X
- X# Enable "News" icon.
- X echo -n "${ESC}]I$ICONDIR/news.icon${ESC}\"
- X# Sound bell ("Read all a------bout it!")
- X sunbell 200 50 200 50 100 50 400 50 100
- X# Sound bell twice (use if "sunbell" is not available)
- X# echo -n "${BEL}" ; sleep 1; echo -n "${BEL}"
- X# Sound bell and make icon visible (Not safe if screen is locked)
- X# echo -n "${BEL}${ESC}[5t" ; echo -n "${BEL}"
- X endif
- X
- X# Read new news
- X echo -n "${ESC}]I$ICONDIR/news.icon${ESC}\"
- X echo -n "${ESC}]l$PROGNAME - News${ESC}\"
- X clear
- X $NEWSPROG
- X clear
- X
- Xend
- X
- SHAR_EOF
- if test 2099 -ne "`wc -c < 'rn.sh'`"
- then
- echo shar: error transmitting "'rn.sh'" '(should have been 2099 characters)'
- fi
- chmod +x 'rn.sh'
- fi # end of overwriting check
- echo shar: extracting "'rn.tt'" '(1916 characters)'
- if test -f 'rn.tt'
- then
- echo shar: will not over-write existing file "'rn.tt'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'rn.tt'
- Xapplication "/usr/news/tooltool/rn.sh"
- X font "/usr/lib/fonts/fixedwidthfonts/screen.r.14"
- X size 36 by 80 characters
- X label "rntool"
- X icon "/usr/news/images/nonews.icon"
- X open "^C"
- X close "q"
- Xgadgets
- X top
- X font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
- X ragged
- X button
- X normal "Default" " "
- X shift "Back" "^B"
- X control "Refresh" "^L"
- X meta "Refresh and decrypt" "X"
- X end_button
- X button
- X normal "Help" "h"
- X end_button
- X button
- X normal "Quit" "q"
- X shift "Close" CLOSE
- X control "Exit" EXIT
- X end_button
- X button
- X normal "List" "L"
- X end_button
- X button
- X normal "Goto" "g"
- X shift "Goto specified subject" "g^Subj.*:.*"
- X control "Goto next subject in article" "^G"
- X meta "Search" "/"
- X end_button
- X button
- X normal "Next" "N"
- X shift "Next unread" "n"
- X control "Next unread with same subject" "^N"
- X meta "Next subject in article" "^G"
- X end_button
- X button
- X normal "Prev" "P"
- X shift "Previous unread" "p"
- X control "Previous unread with same subject" "^P"
- X meta "Previous displayed newsgroup" "-"
- X end_button
- X button
- X normal "Yes" "y"
- X end_button
- X button
- X normal "No" "n"
- X end_button
- X button
- X normal "Top" "^R"
- X shift "Decrypt" "^X"
- X control "Verbose" "v"
- X end_button
- X button
- X normal "Reply" "r"
- X shift "Reply, including article" "R"
- X end_button
- X button
- X normal "Followup" "f"
- X shift "Followup, including article" "F"
- X end_button
- X menu "Others"
- X "Subjects" "="
- X "Next subject" "^G"
- X "Same subject" "^N"
- X "Go to first article" "1"
- X "Go to first unread article" "^"
- X "Go to last article" "$"
- X "Mark all articles read" "c"
- X "Mark article as unread" "m"
- X "Unsubscribe" "u"
- X "Edit KILL file" "^K"
- X end_menu
- Xend_gadgets
- SHAR_EOF
- if test 1916 -ne "`wc -c < 'rn.tt'`"
- then
- echo shar: error transmitting "'rn.tt'" '(should have been 1916 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'news.icon'" '(1933 characters)'
- if test -f 'news.icon'
- then
- echo shar: will not over-write existing file "'news.icon'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'news.icon'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8003,0x9C00,0x0000,0x0001,
- X 0x8001,0xC800,0x0000,0x0001,0x8001,0xC800,0x0000,0x0001,
- X 0x8001,0x6870,0xC63E,0x0001,0x8001,0x68C8,0xC642,0x0001,
- X 0x8001,0x398C,0xC660,0x0001,0x8001,0x39FC,0xD63C,0x0001,
- X 0x8001,0x1980,0xD61E,0x0001,0x8001,0x1980,0xFE43,0x0001,
- X 0x8001,0x08C4,0xEE61,0x0001,0x8003,0x8878,0xC65E,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0xBFFF,0xFD75,0xD346,0x0001,0xA000,0x0524,0x9B49,0x24A1,
- X 0xA010,0x0500,0x0045,0x24D1,0xA040,0x057E,0xAD42,0x2491,
- X 0xA48F,0x7D00,0x0049,0x2C91,0xA8EC,0xE55B,0xEB46,0x1491,
- X 0xAAEA,0xE500,0x0040,0x0001,0xA0AA,0xCD75,0xDF5B,0xE7FD,
- X 0xA8A8,0x8500,0x0040,0x0001,0xAFFF,0xF55F,0xFB57,0x7F7D,
- X 0xA935,0x0500,0x0040,0x0001,0xBFFF,0xFD7E,0x775D,0xFBFD,
- X 0x8000,0x0100,0x0040,0x0001,0xA828,0x0175,0xBD5E,0xFEED,
- X 0xBB3B,0x5500,0x0040,0x0001,0xAB2B,0x756F,0xFF5F,0xBFDD,
- X 0x8000,0x0100,0x0040,0x0001,0xBEFD,0xFD7F,0xCF5D,0xFB7D,
- X 0x8000,0x0100,0x0040,0x0001,0xB7F7,0xFD7B,0xBF57,0xDDDD,
- X 0x8000,0x0100,0x0040,0x0001,0xBBDF,0xDD3E,0xFB5F,0xBDED,
- X 0x8000,0x0100,0x0040,0x0001,0xBF7F,0x7D7F,0x675F,0xFFFD,
- X 0x8000,0x0100,0x0050,0x0005,0xBEE9,0xFD7B,0x9F50,0x3E05,
- X 0x8000,0x0100,0x0050,0x7F05,0xBBDF,0xBD6F,0xEF50,0xFF85,
- X 0x8000,0x0100,0x0051,0xC1C5,0xBFEF,0xFD7E,0xFF51,0x8045,
- X 0x800C,0x4D00,0x0053,0x2165,0xB6ED,0x057B,0xF352,0x52A5,
- X 0x8009,0x6500,0x0052,0x2125,0xBFEA,0x657C,0xFF52,0x0C25,
- X 0x8008,0x8500,0x0052,0x0025,0xBDCF,0x257B,0xBF51,0x3E45,
- X 0x8008,0x0500,0x0050,0x9C85,0xB7EB,0xF57F,0xCF50,0x4105,
- X 0x800A,0x7500,0x0050,0xBE85,0xA7AB,0xB57E,0xEF51,0x0045,
- X 0x800A,0xDD00,0x0052,0x0025,0xBCEF,0xFD6F,0xDF5F,0xFFFD,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- SHAR_EOF
- if test 1933 -ne "`wc -c < 'news.icon'`"
- then
- echo shar: error transmitting "'news.icon'" '(should have been 1933 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'nonews.icon'" '(1933 characters)'
- if test -f 'nonews.icon'
- then
- echo shar: will not over-write existing file "'nonews.icon'"
- else
- sed 's/^ X//' << \SHAR_EOF > 'nonews.icon'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8E70,0x0079,0xC000,0x0001,
- X 0x8720,0x001C,0x8000,0x0001,0x8720,0x001C,0x8000,0x0001,
- X 0x85A0,0xC016,0x870C,0x63E1,0x85A1,0x2016,0x8C8C,0x6421,
- X 0x84E3,0x3013,0x98CC,0x6601,0x84E3,0x3013,0x9FCD,0x63C1,
- X 0x8463,0x3011,0x980D,0x61E1,0x8463,0x3011,0x980F,0xE431,
- X 0x8421,0x2010,0x8C4E,0xE611,0x8E20,0xC078,0x878C,0x65E1,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0xBFFF,0xFD75,0xD346,0x0001,0xA000,0x0524,0x9B49,0x24A1,
- X 0xA000,0x0500,0x0045,0x24D1,0xA000,0x0500,0x0042,0x2491,
- X 0xA000,0x0500,0x0049,0x2C91,0xA000,0x0500,0x0046,0x1491,
- X 0xA000,0x0500,0x0040,0x0001,0xA000,0x0500,0x0040,0x0001,
- X 0xA000,0x0500,0x0040,0x0001,0xA000,0x0500,0x0040,0x0001,
- X 0xA000,0x0500,0x0040,0x0001,0xBFFF,0xFD00,0x0040,0x0001,
- X 0x8000,0x0100,0x0040,0x0001,0xA828,0x0100,0x0040,0x0001,
- X 0xBB3B,0x5500,0x0040,0x0001,0xAB2B,0x7500,0x0040,0x0001,
- X 0x8000,0x0100,0x0040,0x0001,0x8000,0x0100,0x0040,0x0001,
- X 0x8000,0x0100,0x0040,0x0001,0x8000,0x0100,0x0040,0x0001,
- X 0x8000,0x0100,0x0040,0x0001,0x8000,0x0100,0x0040,0x0001,
- X 0x8000,0x0100,0x0040,0x0001,0x8000,0x0100,0x005F,0xFFFD,
- X 0x8000,0x0100,0x0050,0x0005,0x8000,0x0100,0x0050,0x0005,
- X 0x8000,0x0100,0x0050,0x0005,0x8000,0x0100,0x0050,0x0005,
- X 0x8000,0x0100,0x0050,0x0005,0x800F,0xFD00,0x0050,0x0005,
- X 0x8008,0x0500,0x0050,0x0005,0x8008,0x0500,0x0050,0x0005,
- X 0x8008,0x0500,0x0050,0x0005,0x8008,0x0500,0x0050,0x0005,
- X 0x8008,0x0500,0x0050,0x0005,0x8008,0x0500,0x0050,0x0005,
- X 0x8008,0x0500,0x0050,0x0005,0x8008,0x0500,0x0050,0x0005,
- X 0x8008,0x0500,0x0050,0x0005,0x8008,0x0500,0x0050,0x0005,
- X 0x8008,0x0500,0x0050,0x0005,0x800F,0xFD00,0x005F,0xFFFD,
- X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- SHAR_EOF
- if test 1933 -ne "`wc -c < 'nonews.icon'`"
- then
- echo shar: error transmitting "'nonews.icon'" '(should have been 1933 characters)'
- fi
- fi # end of overwriting check
- # End of shell archive
- exit 0
-